<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIdxColumnSentAtChatGlobalIdInMessageInTable extends AbstractMigration
{
    public function up()
    {
        $this->table('message')->addIndex(['chat_global_id', 'sent_at'], ['name' => 'idx_chat_global_id_sent_at', 'type' => 'normal'])->save();
    }

    public function down()
    {
        $this->table('message')->removeIndexByName('idx_chat_global_id_sent_at')->save();
    }
}
